//
//  SearchCourseCell.m
//  TrainTree
//
//  Created by wanghui on 2017/9/21.
//  Copyright © 2017年 YouYeShu. All rights reserved.
//

#import "SearchCourseCell.h"

@implementation SearchCourseCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.icon.layer.cornerRadius = 18.0f;
    self.icon.layer.masksToBounds = YES;
    self.icon.contentMode = UIViewContentModeScaleAspectFit;
}

- (void)configWithModel:(SearchLessonModel *)model
{
    NSString *img = [KindTurnIcon iconWithId:model.themeId];
    [self.icon setImage: ImageNamed(img) forState:UIControlStateNormal];

    UIColor *tmpColor = [KindTurnIcon iconBgColorWithId:model.themeId];
    [self.icon setBackgroundColor:tmpColor];
 
    self.lessonName.text = [NSString stringWithFormat:@" / %@", model.lessonName];
    self.moduleName.text = model.moduleName;

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
